import { defaultBehavior } from "./config/Behavior.config";
import { useBehavior } from "@/stores/behavior";

const getBehavior = (behavior: string, type: string = "status"): string => {
  const behaviorStore = useBehavior();
  const b = behaviorStore.data;
  return b ? b[behavior][type] : defaultBehavior[behavior];
};

const setBehavior = (behavior: Record<string, string>): void => {
  const behaviorStore = useBehavior();
  behavior !== null && behaviorStore.setData(behavior);
};

export { getBehavior, setBehavior };
